package com.zb.vo;

import com.zb.utils.VerificUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @Author WEN
 * @Date 2023/9/20 0020
 **/
@Data
@ApiModel("工单客户对象")
public class OrderUserVo {
    @ApiModelProperty(value = "是否代他人建单：0-否，1-是", example = "false")
    private Boolean helpOtherCreateOrder = Boolean.FALSE;

    @ApiModelProperty(value = "客户ID", example = "0")
    private Long userId;

    @NotBlank(message = "客户姓名不能为空")
    @Length(max = 100, message = "客户姓名长度限制 100 个字符以内")
    @ApiModelProperty(value = "客户姓名", required = true)
    private String name;

    @NotBlank(message = "客户手机号不能为空")
    @Pattern(regexp = VerificUtil.REGEX_PHONE, message = "客户手机号参数不合法")
    @ApiModelProperty(value = "客户手机号")
    private String phone;

    @Length(max = 30, message = "其他电话长度限制 30 个字符以内")
    @ApiModelProperty(value = "其他电话")
    private String otherPhone;

    @NotBlank(message = "客户地址-省不能为空")
    @Length(max = 50, message = "客户地址-省长度限制 50 个字符以内")
    @ApiModelProperty(value = "地址-省", required = true)
    private String province;

    @NotBlank(message = "客户地址-市不能为空")
    @Length(max = 50, message = "客户地址-市长度限制 50 个字符以内")
    @ApiModelProperty(value = "地址-市", required = true)
    private String city;

    @NotBlank(message = "客户地址-县/区不能为空")
    @Length(max = 50, message = "客户地址-县/区长度限制 50 个字符以内")
    @ApiModelProperty(value = "地址-县/区", required = true)
    private String area;

    @Length(max = 50, message = "客户地址-镇长度限制 50 个字符以内")
    @ApiModelProperty(value = "地址-镇")
    private String town;

    @NotBlank(message = "客户详细地址不能为空")
    @Length(max = 200, message = "客户详细地址长度限制 200 个字符以内")
    @ApiModelProperty(value = "客户详细地址", required = true)
    private String address;
}
